package com.ruoyi.fetv.service.impl;

import com.ruoyi.fetv.controller.vo.audit.AuditReq;
import com.ruoyi.fetv.controller.vo.audit.RespVO;
import com.ruoyi.fetv.controller.vo.audit.SearchReq;
import com.ruoyi.fetv.controller.vo.audit.UpdateStatus;
import com.ruoyi.fetv.domain.FetvInformation;
import com.ruoyi.fetv.mapper.FetvInformationMapper;
import com.ruoyi.fetv.service.IFetvAuditService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 审核Service业务层处理
 *
 * @author Jack
 * @date 2023-03-07
 */
@Service
public class FetvAuditServiceImpl implements IFetvAuditService {
    @Autowired
    private FetvInformationMapper fetvInformationMapper;

    /**
     * 查询审核
     *
     * @param id 审核主键
     * @return 审核
     */
    @Override
    public FetvInformation selectFetvAuditById(Long id) {
        return fetvInformationMapper.selectFetvInformationById(id);
    }

    /**
     * 查询审核列表
     *
     * @param fetvAudit 审核
     * @return 审核
     */
    @Override
    public List<RespVO> selectFetvAuditList(SearchReq fetvAudit) {
        return fetvInformationMapper.selectFetvAuditList(fetvAudit);
    }


    /**
     * 批量删除审核
     *
     * @param ids 需要删除的审核主键
     * @return 结果
     */
    @Override
    public int deleteFetvAuditByIds(Long[] ids) {
        return fetvInformationMapper.deleteFetvInformationByIds(ids);
    }

    /**
     * 删除审核信息
     *
     * @param id 审核主键
     * @return 结果
     */
    @Override
    public int deleteFetvAuditById(Long id) {
        return fetvInformationMapper.deleteFetvInformationById(id);
    }

    @Override
    public int updateStatus(UpdateStatus fetvAudit) {
        return fetvInformationMapper.updateStatus(fetvAudit);
    }

    @Override
    public int audit(AuditReq fetvAudit) {
        return fetvInformationMapper.audit(fetvAudit);
    }
}
